package com.example.spinning.mapper;

import com.example.spinning.bean.SemiQuality;


import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SemiQualityMapper extends Mapper<SemiQuality> {

    //添加一条新的原料记录
    int addNewSemiQuality(SemiQuality semiQuality);

    //根据id删除原料记录
    int deleteSemiQualityById(@Param("ids") Long[] ids);

    //根据id查记录
    SemiQuality getSemiQualityById(Long id);

    //根据品名查记录
    List<SemiQuality> getSemiQualityByName(@Param("name") String name);
    //查指定品名的数量
    int getNameCount(@Param("name") String name);

    //修改
    int updateSemiQualityById(SemiQuality semiQuality);
    //查所有
    List<SemiQuality> getAll(@Param("start") Integer start,@Param("count") Integer count);
    //查总数量
    int getAllCount();

}
